< previous page page_126 next page >

Page 126
The whole concept of hierarchies simply means that objects can contain other objects, which in turn contain other objects. As you might have figured out, the terms object and class are mostly interchangeable. A class is like a data type that describes what kind of object you are referring to.
System Objects
Besides the objects that you can declare, such as forms, several other objects are included with Visual Basic to make your life as a programmer easier. These system objects can be used anywhere in an application. Although you can't define new instances of these objects or pass them as variables to other routines, they still are very useful. The five available system objects are listed in Table 5.1 along with some of their more important methods.
TABLE 5.1. THE AVAILABLE SYSTEM OBJECTS IN VISUAL BASIC.
ObjectDescriptionMethods/Properties
AppThe current applicationEXEName returns the application's filename
Path returns the application's path
Title returns the startup form's title bar text
Previnstance returns True if another instance (copy) of the application is currently running
ClipBoardThe Windows ClipboardClear erases the contents of the clipboard
GetData/SetData gets or returns the graphic image stored on the clipboard
GetText/SetText gets or returns the text on the clipboard
GetFormat returns the format of the clipboard object
DebugThe Immediate windowPrint copies information, at runtime, to the Immediate window (possible only in non-.EXE Visual Basic programs you run from Visual Basic's development environment)
Assert suspends the execution of the application if the expression is false
PrinterThe system printerProvides printer support to the application
ScreenThe user's screenFontCount returns the number of fonts the current screen supports
Fonts contains a list of all the screen's possible font names

(table continued on next page)

 
< previous page page_126 next page >

If you like this book, buy it!